package com.wing.device.model.response;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wing.common.enums.InspectEnum;
import com.wing.mybatis.common.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 设备附件表
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("pro_inspect")
public class DeviceInspectVO extends BaseEntity<DeviceInspectVO> implements Serializable {

    private static final long serialVersionUID = 1L;


    @TableField(value = "inspect_name")
    private String inspectName;

    @TableField(value = "inspect_type")
    private Integer inspectType;

    @TableField(value = "inspect_status")
    private Integer inspectStatus;


    private Integer inspectStatusDesc;

    public String getInspectStatusDesc() {
        return InspectEnum.InspectStatusEnum.getNameByCode(getInspectStatus());
    }

    private Integer examineTypeDesc;

    public String getExamineTypeDesc() {
        return InspectEnum.examineTypeEnum.getNameByCode(getExamineType());
    }

    @TableField(value = "device_id")
    private Long deviceId;

    @TableField(value = "examine_type")
    private Integer examineType;

    @TableField(value = "device_name")
    private String deviceName;

    @TableField(value = "category_id")
    private Long categoryId;

    @TableField(value = "category_name")
    private String categoryName;

    @TableField(value = "device_type_id")
    private Long deviceTypeId;

    @TableField(value = "device_type")
    private String deviceType;

    @TableField(value = "device_brand_id")
    private Long deviceBrandId;

    @TableField(value = "device_brand_name")
    private String deviceBrandName;

    @TableField(value = "device_model_id")
    private Long deviceModelId;

    @TableField(value = "device_model_name")
    private String deviceModelName;

    @TableField(value = "device_code")
    private String deviceCode;

    @TableField(value = "supplier_id")
    private Long supplierId;

    @TableField(value = "supplier_name")
    private String supplierName;

    @TableField(value = "inspect_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime inspectTime;

    @TableField(value = "done_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime doneTime;

    private Integer inspectCycle;

}
